// 测试deepseek调用
// import OpenAI from "openai";
const OpenAI = require("openai");
const openai = new OpenAI({
  baseURL: "https://api.deepseek.com",
//   apiKey: "<DeepSeek API Key>"
  apiKey: "sk-68a8678e4f7c4b72a1ef4f83c3a0b0a5",//请自己申请key来使用
});

async function main() {
  const completion = await openai.chat.completions.create({
    messages: [{ role: "system", content: "你好，告诉我怎么使用deepseek" }],
    model: "deepseek-chat",
    stream:false, //是否流式输出
  });

  // console.log(completion.choices[0].message.content);
  console.log(completion.choices);
}

main();
